<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('test1', 'TestController@index');
Route::get('catalog', 'TestController@catalogTest');
Route::get('blade', function () {
    return view('admin.index');
});

//portal
Route::group(['prefix' => 'api'], function () {
    Route::get('catalog', 'Portal\CatalogController@getCatTree');
});


Route::group(['prefix' => 'admin'], function () {
    Route::get('index', function(){
        return view('admin.index');
    });
    Route::get('catalog', function(){
        return view('admin.catalog');
    });

    Route::get('catalog/{id}', 'CatalogController@getCatalog');
});







